import request from '@/utils/request.js'

const prefix = '/api/pay'


/**
 * 提交场馆预约订单
 */
export function postStadiumTableOrder(data) {
	return request({
		url: prefix + '/postStadiumTableOrder',
		method: 'post',
		data: data
	})
}

/**
 * 提交课程卡订单
 */
export function postClassOrder(id) {
	return request({
		url: prefix + '/postClassOrder',
		method: 'post',
		data: {
			classCardId: id
		}
	})
}

/**
 * @param {Object} data
 * 提交商品订单
 */
export function postGoodsOrder(data) {
	return request({
		url: prefix + '/postGoodsOrder',
		method: 'post',
		data: data
	})
}

/**
 * @param {Object} data
 * 提交入驻订单
 */
export function postJoinOrder() {
	return request({
		url: prefix + '/postJoinOrder',
		method: 'post'
	})
}
/**
 * 提交会员卡订单
 *
 */
export function postCardOrder(data) {
	return request({
		url: prefix + '/postCardOrder',
		method: 'post',
		data: data
	})
}

/**
 *根据订单号查询
 */
export function getOrderByOrderNo(orderNo) {
	return request({
		url: prefix + '/getOrderStatus/' + orderNo,
		method: 'get'
	})
}